-- GENERATED SPELL FOR [Vile Fin Minor Oracle] --


function spell0_1544(pUnit, Event) --@Lightning Bolt,n/a--
pUnit:FullCastSpellOnTarget(9532,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1544', 3000, 1)
end

function spell1_1544(pUnit, Event) --@Lightning Shield,Self--
pUnit:FullCastSpellOnTarget(324,pUnit)
pUnit:RegisterEvent('Sorts_1544', 580, 1)
end

function spell2_1544(pUnit, Event) --@Shock,n/a--
pUnit:FullCastSpellOnTarget(2607,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1544', 0, 1)
end

function Sorts_1544(pUnit, Event)
local choix_sorts_1544 = math.random(0, 2)
if choix_sorts_1544 == 0 then
pUnit:RegisterEvent('spell0_1544', 1, 1)
end
if choix_sorts_1544 == 1 then
pUnit:RegisterEvent('spell1_1544', 1, 1)
end
if choix_sorts_1544 == 2 then
pUnit:RegisterEvent('spell2_1544', 1, 1)
end
end

function mob1544_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1544', math.random(1500, 3000), 1)
end

function mob1544_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1544_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1544_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1544, 1, 'mob1544_Action')
RegisterUnitEvent(1544, 2, 'mob1544_Leave')
RegisterUnitEvent(1544, 3, 'mob1544_Kill')
RegisterUnitEvent(1544, 4, 'mob1544_Die')
